{% load i18n l10n cms_tags %}
<div class="cms-dragbar cms-dragbar-{{ placeholder.pk|unlocalize }}">
    {% if object_is_immutable %}
        <div class="cms-submenu-btn cms-submenu-add cms-btn cms-btn-disabled">
            <span class="cms-hover-tooltip cms-hover-tooltip-left cms-hover-tooltip-delay" data-cms-tooltip="{% trans "You do not have permission to edit this item" %}"></span>
        </div>
    {% else %}
        <div class="cms-submenu-btn cms-submenu-add cms-btn">
            <span class="cms-hover-tooltip cms-hover-tooltip-left cms-hover-tooltip-delay" data-cms-tooltip="{% trans "Add plugin" %}"></span>
        </div>
    {% endif %}
    <div class="cms-submenu-settings cms-submenu-btn cms-btn"></div>
    <div class="cms-submenu-dropdown cms-submenu-dropdown-settings" data-touch-action="pan-y">
        <div class="cms-dropdown-inner">
            <div class="cms-submenu-item"><a data-cms-icon="copy" data-rel="copy" href="#">{% trans "Copy all" %}</a></div>
            {% for language in placeholder.get_filled_languages %}{% if language.code != LANGUAGE_CODE %}
                <div class="cms-submenu-item"><a data-cms-icon="copy" data-rel="copy-lang" data-language="{{ language.code }}" href="#">{% trans "Copy from" %} {% trans language.name %}</a></div>
            {% endif %}{% endfor %}
            {% if object_is_immutable %}
                <div class="cms-submenu-item cms-submenu-item-disabled"><a data-cms-icon="paste" href="#">{% trans "Paste" %}</a></div>
                <div class="cms-submenu-item cms-submenu-item-disabled"><a data-cms-icon="bin" href="#">{% trans "Empty all" %}</a></div>
            {% else %}
                <div class="cms-submenu-item"><a data-cms-icon="paste" data-rel="paste" href="#">{% trans "Paste" %}</a></div>
                <div class="cms-submenu-item"><a data-cms-icon="bin" data-rel="modal" href="{% url "admin:cms_placeholder_clear_placeholder" placeholder.id %}" data-name="{{ placeholder.get_label }}">{% trans "Empty all" %}</a></div>
            {% endif %}
            {% render_extra_menu_items placeholder %}
        </div>
    </div>
    <div class="cms-plugin-picker" data-touch-action="pan-y">
        <div class="cms-quicksearch"><label><input type="text" placeholder="{% trans 'Filter plugins...' %}" /></label></div>
        {# plugin child classes here #}
    </div>

    <div class="cms-dragbar-title" title="{{ placeholder.get_label }}">
        {{ placeholder.get_label }}
        {% if placeholder.is_static %}<span class="cms-hover-tooltip cms-hover-tooltip-right" tabindex="-1" data-cms-tooltip="{% trans 'This is a static placeholder' %}"><span class="cms-icon cms-icon-pin cms-dragarea-static-icon"></span></span>{% endif %}
        <span class="cms-dragbar-toggler">
            <a href="#" class="cms-dragbar-expand-all" tabindex="-1">{% trans "Expand all" %}</a>
            <a href="#" class="cms-dragbar-collapse-all" tabindex="-1">{% trans "Collapse all" %}</a>
        </span>
    </div>
</div>
